package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("ams_user")
public class User implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //用户名
    private String account;
    //用户密码
    private String password;
    //用户性别
    private Integer sex;
    //出生日期
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date birth;
    //手机号
    private String phone;
    //邮箱
    private String email;
    //地址
    private String address;
    //角色id
    private Integer roleid;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    private Date createtime;
    //用户头像
    private String userphoto;

    @ApiModelProperty("月份")
    @TableField(exist = false)
    private String month;

    @ApiModelProperty("用户数量")
    @TableField(exist = false)
    private Integer usercount;



}
